﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;

namespace MobileManager.InfoManage
{
    public partial class InfoMenu : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                StringBuilder sbHTML = new StringBuilder(500);
                string strRequst = Request.Url.ToString().ToLower();
                sbHTML.Append("<table id=\"TBmenu\">");
                //sbHTML.Append(string.Format("<tr><td><a href=\"MAreaManage.aspx\" class=\"{0}\" target=\"_self\">区域管理</a></td></tr>", GetClassName(strRequst, "MAreaManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MSPbusiManage.aspx\" class=\"{0}\" target=\"_self\">通道商管理</a></td></tr>", GetClassName(strRequst, "MSPbusiManage")));
                sbHTML.Append(string.Format("<tr><td><a href=\"MODEPManage.aspx\" class=\"{0}\" target=\"_self\">运行商管理</a></td></tr>", GetClassName(strRequst, "MODEPManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MchannelManage.aspx\" class=\"{0}\" target=\"_self\">通道管理</a></td></tr>", GetClassName(strRequst, "MchannelManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"McustomerManage.aspx\" class=\"{0}\" target=\"_self\">客户管理</a></td></tr>", GetClassName(strRequst, "McustomerManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MmaskManage.aspx\" class=\"{0}\" target=\"_self\">短信屏蔽管理</a></td></tr>", GetClassName(strRequst, "MmaskManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MmaskChinaManage.aspx\" class=\"{0}\" target=\"_self\">屏蔽中文关键字</a></td></tr>", GetClassName(strRequst, "MmaskChinaManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MmaskEnglishManage.aspx\" class=\"{0}\" target=\"_self\">屏蔽英文关键字</a></td></tr>", GetClassName(strRequst, "MmaskEnglishManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MmaskNumberManage.aspx\" class=\"{0}\" target=\"_self\">屏蔽号码关键字</a></td></tr>", GetClassName(strRequst, "MmaskNumberManage")));
                //sbHTML.Append(string.Format("<tr><td><a href=\"MmarkArea.aspx\" class=\"{0}\" target=\"_self\">城市屏蔽管理</a></td></tr>", GetClassName(strRequst, "MmaskNumberManage")));
                sbHTML.Append("</table>");
                divMenu.InnerHtml = sbHTML.ToString();
            }
        }
        private string GetClassName(string strRequst, string strPage)
        {
            if (strRequst.Contains(strPage.ToLower()))
                return "Aselected";
            else return "Anormal";
        }
    }
}